package com.wangjiang.foundation.mybatis.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wangjiang.foundation.mybatis.entity.BaseEntity;
import com.wangjiang.foundation.mybatis.entity.BaseListRet;
import com.wangjiang.foundation.mybatis.entity.BaseVO;
import com.wangjiang.foundation.mybatis.params.IdList;
import com.wangjiang.foundation.mybatis.params.QueryParams;

public interface CurdService<T extends BaseEntity, V extends BaseVO> extends IService<T> {

    V getByUuid(String uuid);

    V getById(Long id);

    V createVoInstance();

    T createEntity();

    boolean update(String id, T entity);

    Boolean patch(String id, T modelToEntity);

    boolean insert(T modelToEntity);

    boolean delete(String id);

    Boolean deleteByIds(IdList ids);

    BaseListRet<V> getList(QueryParams queryParams);

}
